import Image = WechatMiniprogram.Image

export interface IPoint {
  x: number
  y: number
  x1: number
  y1: number
  x2: number
  y2: number
}

export interface IDynamicText {
  text: string
  size: number
  family: string
  color: string
  offset: { x: number, y: number }
}

export interface IRange {
  location: number
  length: number
}

export interface IPlayerOptions {
  id: string
  url: string
  loops?: number
  clearAfterStop?: boolean
  component?: WechatMiniprogram.Component.TrivialInstance
  fillMode?: IFillMode
  contentMode?: IContentMode
}

export interface IVideoImage {
  key: string
  value: Image | undefined
}

export interface ITransform {
  a: number
  b: number
  c: number
  d: number
  tx: number
  ty: number
}

export type IFillMode = 'Forward' | 'Backward'
export type IContentMode = 'Fill' | 'AspectFit' | 'AspectFill'